from django.conf import settings
from django.core.files.storage import Storage


class FastDFSStorage(Storage):
    def __init__(self,path=None):
        if path:
            self.path = path
        else:
            self.path = settings.FDFS_BASE_URL

    def _open(self, name, mode='rb'):
        pass

    def _save(self, name, content):
        pass

    def url(self, name):
        return self.path + name
